package com.zh.security;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;

/**
 * @Description: 学习springSecurity
 * @ClassName SpringSecurityApplication
 * @date: 2021.10.16 19:55
 * @Author: zhanghang
 */
@SpringBootApplication
/**
 * @EnableGlobalMethodSecurity 开启spring-security 注解
 * securedEnabled： 开启角色验证，默认为false,不可使用
 * prePostEnabled： 开启权限验证，默认为false,不可使用
 */
@EnableGlobalMethodSecurity(securedEnabled = true,prePostEnabled = true)
public class SpringSecurityApplication {

	public static void main(String[] args) {
		SpringApplication.run(SpringSecurityApplication.class,args);
	}
}
